
package com.hockeo.tinygds;

import java.lang.reflect.Field;

import com.google.appengine.api.datastore.Entity;
import com.google.appengine.api.datastore.Key;

/**
 * Represents a field that is either a Long or a String and that acts as ID of a
 * persistent entity.
 * 
 * @version $Id$
 * @author jjanke
 */
abstract class TFieldPrimaryKey<T> extends TField<T>
{
  protected TFieldPrimaryKey( TinyGDSFactory factory, Field field )
  {
    super( factory, field );
  }

  public abstract Entity createEntity( Object objInstance, String strKind, Key keyParent );
  
  public abstract Key getKey( Object objInstance, String strKind, Key keyParent );
  
  public abstract void setKey( Object objInstance, Key key );
}
